#include "register.h"

//注册  ---始终对着
void Register(USE* user_info, int sock) {
	int ret = 0;
	char *dest = NULL;
	printf("请输入创建的账号：\n");
	scanf("%s", user_info->user_name);
	printf("请输入创建的密码：\n");
	scanf("%s", user_info->user_password);
	printf("type:%d\tuser_type:%d\n",user_info->type,user_info->user_type);
	dest = json_pack(user_info);
	puts(dest);
	ret = send(sock, dest, 1024, 0);
	if (ret == -1) {
		perror("send");
		exit(-1);
	}
}
